package com.stx.jeepay.core.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.stx.jeepay.core.dao.MchDivisionReceiverGroupDao;
import com.stx.jeepay.core.entity.MchDivisionReceiverGroupEntity;

import com.stx.jeepay.core.service.MchDivisionReceiverGroupService;
import org.springframework.stereotype.Service;

import java.util.Map;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


@Service("mchDivisionReceiverGroupService")
public class MchDivisionReceiverGroupServiceImpl extends ServiceImpl<MchDivisionReceiverGroupDao, MchDivisionReceiverGroupEntity> implements MchDivisionReceiverGroupService {

    /**
     * 根据ID和商户号查询
     **/
    @Override
    public MchDivisionReceiverGroupEntity findByIdAndMchNo(Long groupId, String mchNo) {
        return getOne(new LambdaQueryWrapper<MchDivisionReceiverGroupEntity>()
                .eq(MchDivisionReceiverGroupEntity::getReceiverGroupId, groupId)
                .eq(MchDivisionReceiverGroupEntity::getMchNo, mchNo));
    }
}